#!/usr/bin/env python
# test_currency.py

__version__ = "$Revision: 1.2 $"
__author__  = 'Ramesh Balasubramanian <ramesh@finpy.org>'

import finpy
import unittest
import sys

class CurrencyTestCase(unittest.TestCase):
	def test_thirtytwo2dec(self):
		inNumbers  = [101, 102]
		inFractions = [25, 31]
	
		outNumbers = [finpy.thirtytwo2dec(inNumber, inFraction) for inNumber, inFraction in zip(inNumbers, inFractions)]
		if sys.version.find('.NET') != -1:
			assert outNumbers == [101.7812, 102.9688]
		else:
			assert outNumbers == [101.7813, 102.9688]

if __name__ == '__main__':
	unittest.main()